<template>
  <div>
        <div class="search-bar">
            <div class="position" @click="positionSelect">
                <img class="icon-position" src="/static/images/icon_positon.png"/>
                <span class="city">{{positionCity}}</span>
                <img  class="icon-jiantou" src="/static/images/icon_jiantou.png" />
            </div>
            <div class="input-box" @click="onClickSearch">
                <div class="input" >请输入单位名称</div>
                <img src="/static/images/icon_search_btn.png" class="search-btn"/>
            </div>
        </div>
  </div>
</template>

<script>
export default {
    props:{
        positionCity:{
            type: String,
            default: ''
        },
        onClickSearch:{
            type: Function,
            default: ()=>{}
        },
    },
    data(){
        return{
           
        }
    },
    created(){
        
    },
    methods:{
        positionSelect(){
            this.$emit('showSelect',true)
        }
    }
}
</script>

<style lang="scss" scoped>
    .search-bar{
        width: 100%;
        height: 128rpx;
        background-color: #fff;
        padding: 0 30rpx;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        box-shadow: #eeeeee 0px 4rpx 5rpx;
        .position{
            display: flex;
            justify-content: center;
            align-items: center;
            width: 147rpx;
            height: 80rpx;
            .icon-position{
                width: 22rpx;
                height: 27rpx;
            }
            .city{
                color: #4b4b4b;
                font-size: 28rpx;
                margin-left: 10rpx;
                max-width: 100rpx;
                overflow: hidden;
                text-overflow:ellipsis;
                white-space: nowrap;
            }
            .icon-jiantou{
                width: 15rpx;
                height: 11rpx;
                margin-left: 10rpx;
            }
        }
        .input-box{
            display: flex;
            justify-content: flex-start;
            align-items: center;
            margin-left: 19rpx;
            .input{
                min-width:453rpx;
                height:77rpx;
                background:rgba(238,238,238,1);
                font-size: 28rpx;
                padding-left: 15rpx;
                line-height: 77rpx;
                color: #333;
                font-weight:500;
                color:rgba(152,152,152,1);
            }
            .search-btn{
                width:84rpx;
                height:77rpx;
                background-size: 100% 100%;
                background-repeat: no-repeat;
                position: relative;
                left: -1rpx;
            }
        }
    }
</style>